package com.echo.register.commons.config;

import com.echo.register.domain.VoteCadidate;

public class CadidateHolder {

    private final static ThreadLocal<VoteCadidate> userHolder = new ThreadLocal<>();

    public static void add(VoteCadidate cadidate){
        userHolder.set(cadidate);
    }

    public static VoteCadidate get(){
        return userHolder.get();
    }

    public static void remove(){
        userHolder.remove();
    }
}
